import { request, get, post, put, del } from '@/utils/request'




export function getFiles(path) {
  let base64 = btoa(path)
  return request({
    method: 'GET',
    dataType: 'json',
    //http://192.168.117.27:5000/file-manage-client/api/v1/file?path=L2Jvb3Q%3D
    url: '/api/v1/file?path=' + base64,
    headerSign: false
  })
}



export function getAllNotes() {
  return get({
    url: '/myNote',
    headerSign: false
  })
}

export function saveNote(data) {
  return post({
    url: '/myNote',
    headerSign: false,
    data: data
  })
}

export function addNote(data) {
  return put({
    url: '/myNote',
    headerSign: false,
    data: data
  })
}
export function deleteNote(id) {
  return del({
    url: '/myNote',
    headerSign: false,
    params: { noteId: id }
  })
}
